<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
<title><?php echo $title;?></title>
<link href="<?php echo base_url()?>css/sites/home.css" rel="stylesheet" type="text/css" />
<link href="<?php echo base_url()?>css/sites/list.css" rel="stylesheet" type="text/css" />
<link href="<?php echo base_url()?>css/sites/featuredcontentglider.css" rel="stylesheet" type="text/css" />
<script type="text/javascript" src="<?php echo base_url()?>js/sites/jquery.min.js"></script>

</head>

<body>
	<a name="gotop"></a>
	<div class="wraper">
		<!--__________________________________________Start.nav_menu-->
		<div class="nav_menu">
			<?php echo $this->load->view('sites/menu/main_menu');?>						
		</div><!--End.nav_menu-->

		<!--__________________________________________Start.middle-->
		<div class="middle">
			<div class="adv1" style="float: left; width: 49%; height:60px; border: 1px solid #CCC; padding: 1px;">
				<a href="#"><img src="<?php echo base_url()?>images/sites/Adv1.png" width="480" height="60" /></a> 
			</div><!--End.adv1-->
			<div class="adv1" style="float: right; width: 49%; height: 60px; border: 1px solid #CCC; padding: 1px;">
				<a href="#"><img src="<?php echo base_url()?>images/sites/Adv1.png" width="480" height="60" /></a> 
			</div><!--End.adv1-->
			<div class="clear"></div>
			
			<div style="float: right; margin-bottom: 10px;">
				<?php echo $this->load->view('sites/includes/location');?>
			</div>
			<div class="clear"></div>

			<div class="col_720">
				<div class="level2_list" <?php if (!empty($subsubcategory) && isset($subsubcategory)) echo 'style="margin: 0px;"'?>>
					<div class="list_level2">
						<?php if (!empty($province_id) && isset($province_id)){?>
				    		<a <?php if (empty($id_subcat)){?>class="act_1"<?php }?> href="<?php echo base_url().$province_name.'/'.$name_cat.'-'.$id_cat.'.html'?>">Tất cả</a>[<?php echo count($totalproductcategory)?>]
				    	<?php }else{?>
				    		<a <?php if (empty($id_subcat)){?>class="act_1"<?php }?> href="<?php echo base_url().$name_cat.'-'.$id_cat.'.html'?>">Tất cả</a>[<?php echo count($totalproductcategory)?>]
				    	<?php }?>
				    	
				    	<?php foreach ($subcategory as $sub_cat){?>
				    		<?php if (!empty($province_id) && isset($province_id)){?>
				    			<?php $totalproductsubcategory	= $this->mod_lib->load_all('products', '', array('cat_2_id'=>$sub_cat['id'], 'province_id'=>$province_id), '', '', array());?>
			    				<a <?php if ($sub_cat['id'] == $id_subcat) echo 'class="act_1";';?> href="<?php echo base_url().$province_name.'/'.url_title(utf8_to_ascii($sub_cat['name'])).'-'.$name_cat.'-'.$id_cat.'-'.$sub_cat['id'].'.html'?>"><?php echo $sub_cat['name']?></a>[<?php echo count($totalproductsubcategory);?>]
			    			<?php }else{?>
			    				<?php $totalproductsubcategory	= $this->mod_lib->load_all('products', '', array('cat_2_id'=>$sub_cat['id']), '', '', array());?>
			    				<a <?php if ($sub_cat['id'] == $id_subcat) echo 'class="act_1";';?> href="<?php echo base_url().url_title(utf8_to_ascii($sub_cat['name'])).'-'.$name_cat.'-'.$id_cat.'-'.$sub_cat['id'].'.html'?>"><?php echo $sub_cat['name']?></a>[<?php echo count($totalproductsubcategory);?>]
			    			<?php }?>
				        <?php }?>				        
				    </div>
				    <div class="clear"></div>				    				    
				</div><!--End. level2_list-->
				
				<?php if (!empty($subsubcategory) && isset($subsubcategory)){?>
					<div class="level3_list">
						<div class="list_level2">
							<?php if (!empty($province_id) && isset($province_id)){?>
					    		<a <?php if (empty($id_subsubcat)){?>class="act_1"<?php }?> href="<?php echo base_url().$province_name.'/'.$name_subcat.'-'.$name_cat.'-'.$id_cat.'-'.$id_subcat.'.html'?>">Tất cả</a>[<?php echo count($totalproductsubcat)?>]
					    	<?php }else{?>
					    		<a <?php if (empty($id_subsubcat)){?>class="act_1"<?php }?> href="<?php echo base_url().$name_subcat.'-'.$name_cat.'-'.$id_cat.'-'.$id_subcat.'.html'?>">Tất cả</a>[<?php echo count($totalproductsubcat)?>]
					    	<?php }?>
					    	<?php foreach ($subsubcategory as $row_subsubcat){?>
					    		<?php if (!empty($province_id) && isset($province_id)){?>
					    			<?php $totalproductsubsubcat	= $this->mod_lib->load_all('products', '', array('cat_3_id'=>$row_subsubcat['id'], 'province_id'=>$province_id), '', '', array());?>
					    			<a <?php if ($row_subsubcat['id'] == $id_subsubcat) echo 'class="act_1";';?> href="<?php echo base_url().$province_name.'/'.url_title(utf8_to_ascii($row_subsubcat['name'])).'-'.$name_subcat.'-'.$name_cat.'-'.$id_cat.'-'.$id_subcat.'-'.$row_subsubcat['id'].'.html'?>"><?php echo $row_subsubcat['name']?></a>[<?php echo count($totalproductsubsubcat);?>]
					    		<?php }else{?>
					    			<?php $totalproductsubsubcat	= $this->mod_lib->load_all('products', '', array('cat_3_id'=>$row_subsubcat['id']), '', '', array());?>
					    			<a <?php if ($row_subsubcat['id'] == $id_subsubcat) echo 'class="act_1";';?> href="<?php echo base_url().url_title(utf8_to_ascii($row_subsubcat['name'])).'-'.$name_subcat.'-'.$name_cat.'-'.$id_cat.'-'.$id_subcat.'-'.$row_subsubcat['id'].'.html'?>"><?php echo $row_subsubcat['name']?></a>[<?php echo count($totalproductsubsubcat);?>]
					    		<?php }?>
					        <?php }?>				        
					    </div>
					    <div class="clear"></div>				    				    
					</div><!--End. level2_list-->
				<?php }?>
				
				<?php if (!empty($province_id) && isset($province_id)){?>
					<?php $distinct		= $this->db->get_where('distincts', array('province_id'=>$province_id))->result_array();?>
					<div class="districts_list">
						<div class="list_districts" style="float: left;">
							<?php foreach ($distinct as $rowdis){?>
							<div class="item-condition">
								<?php
									if (!empty($id_subsubcat))										
										$totalproductdistinct	= $this->mod_lib->count('products', array('province_id'=>$province_id, 'distinct_id'=>$rowdis['id'], 'cat_1_id'=>$id_cat, 'cat_2_id'=>$id_subcat, 'cat_3_id'=>$id_subsubcat));
									elseif (!empty($id_subcat))
										$totalproductdistinct	= $this->mod_lib->count('products', array('province_id'=>$province_id, 'distinct_id'=>$rowdis['id'], 'cat_1_id'=>$id_cat, 'cat_2_id'=>$id_subcat));
									else
										$totalproductdistinct	= $this->mod_lib->count('products', array('province_id'=>$province_id, 'distinct_id'=>$rowdis['id'], 'cat_1_id'=>$id_cat));
								?>
								<?php if (!empty($id_subsubcat)){?>
									<a <?php if ($province_name == $this->uri->segment(2)){?> class="act_1"<?php }?> href="<?php echo base_url().$province_name.'/'.$name_subsubcat.'-'.$name_subcat.'-'.$name_cat.'-'.$id_cat.'-'.$id_subcat.'-'.$id_subsubcat.'-d'.$rowdis['id'].'.html'?>"><?php echo $rowdis['name']?></a> (<?php echo $totalproductdistinct;?>)
								<?php }elseif (!empty($id_subcat)){?>
									<a <?php if ($province_name == $this->uri->segment(2)){?> class="act_1"<?php }?> href="<?php echo base_url().$province_name.'/'.$name_subcat.'-'.$name_cat.'-'.$id_cat.'-'.$id_subcat.'-d'.$rowdis['id'].'.html'?>"><?php echo $rowdis['name']?></a> (<?php echo $totalproductdistinct;?>)
								<?php }else{?>
									<a <?php if ($province_name == $this->uri->segment(2)){?> class="act_1"<?php }?> href="<?php echo base_url().$province_name.'/'.$name_cat.'-'.$id_cat.'-d'.$rowdis['id'].'.html'?>"><?php echo $rowdis['name']?></a> (<?php echo $totalproductdistinct;?>)
								<?php }?>
							</div>				            
							<?php }?>							
					    </div><div class="clear"></div>
					</div>
				<?php }?>
				<div class="clear"></div><!--End. districts_list-->

				<div class="list_main">
					<!--
					<div class="note">
			            <span><img src="Images/bul_vip.gif" width="9" height="9" />&nbsp;Tin vip</span>
			            <span><img src="Images/bul_hot.gif" width="9" height="9" />&nbsp;Tin hot</span>
			            <span><img src="Images/bul_new.gif" width="9" height="9" />&nbsp;Tin mới</span>
			            <span><img src="Images/bul_xnhieu.gif" width="9" height="9" />&nbsp;Tin xem nhiều</span>
			            <span><img src="Images/bul_bonus.gif" width="9" height="9" />&nbsp;Tin thường</span><br/>
			            <input class="butt_port_vip" type="button" value="Đăng tin vip" />
			        </div>
			        -->
			        <div class="paging" style="margin: 0px; border-bottom: 1px solid #E3E3E3;">
			        	<?php echo $paging;?>			        	
			        </div><!--End.paging-->
			        <?php $i=1; foreach ($listproductcategory as $rowlist){?>
				        <div style="margin-left: 5px;" id="adT104613950" class="ad" title="Top of Page Ad">
							<table width="100%" cellspacing="0" cellpadding="0" border="0" style="margin-top:5px">  								 
	  							<tr>
	    							<td width="80%" valign="top">
	    								<h2 class="adtitle">
	    									<a title="" style="color:#009900; font-size:14px;" href="http://delhi.quikr.com">
	    										<?php
		    										if (!empty($rowlist['distinct_id']))
		    										{
		    											$row_distinct	= $this->db->get_where('distincts', array('id'=>$rowlist['distinct_id']))->row_array();
		    											echo $row_distinct['name'];
		    										}
		    										else
		    										{
		    											$row_province	= $this->db->get_where('provinces', array('id'=>$rowlist['province_id']))->row_array();
		    											echo $row_province['name'];
		    										}
	    										?>
	    									</a>
	    									<span style="color:#009900;">:</span>&nbsp; 
	    									<a title="Ace usb wire/data cable only on rs 99" href="http://delhi.quikr.com/ACE-USB-Wire-Data-Cable-Only-On-Rs-99-W0QQAdIdZ104613950" target="_self"><?php echo $rowlist['title']?></a> 
	    								</h2>
	    							</td>
	    							<td width="5%" valign="middle" align="right"></td>
	    							<td valign="middle" align="right">
	    								<a onclick="replyClick(104613950,'T',0);" id="RT-104613950" style="text-decoration:none;" href="javascript:void(0)">
	    									<div class="reply_button_sprite">Reply</div>
	    								</a>    								
	    							</td>
	    						</tr>
	   							
	   							<tr>
	     							<td colspan="3">
	     								<div class="blank5"></div>
	      								<table width="100%" cellspacing="0" cellpadding="0" border="0" style="margin-bottom: 4px;">         
	          								<tr>
	          									<td width="60" height="60" align="center" style="vertical-align:top; line-height: 18px;padding-top:5px;">
	          										<table width="60" height="60" cellspacing="0" cellpadding="0" border="0" style="border: 1px solid #e2e2e2;background-color:#ffffff;">
	          											<tr>
	          												<td valign="middle" align="center">
	          													<a style="text-decoration:none;color:white" href="http://delhi.quikr.com/ACE-USB-Wire-Data-Cable-Only-On-Rs-99-W0QQAdIdZ104613950">
	          														<div>
	          															<img width="37" height="50" applyheightwidth="1" src="http://img2.kuikr.com/k/20130207/144590863-1360225877_sq.JPG" metacategory="Electronics &amp; Technology" alt="ACE USB Wire/Data Cable Only On Rs 99" soldoutimgtxt="">
	          														</div>
																</a>
															</td>
														</tr>
													</table>
												</td>
												<td valign="top" style="padding-left:12px; line-height: 18px; text-align: justify;"><?php echo word_limiter($rowlist['content'], 70)?></td>
												<td valign="top" height="50%" align="right" style="font-family: Arial; font-size: 11px; color: rgb(90, 90, 90); width: 95px;">
													<table border="0" style="width:70px;text-align: right;">
														<tr align="right">
															<td>
																<span class="font12px"><strong><?php echo date('d/m/Y', $rowlist['updatedate'])?></strong></span>
															</td>
														</tr>
														<tr align="right">
															<td align="right"></td>
														</tr>
														<tr>
															<td valign="right"><?php echo $rowlist['click']?></td>
														</tr>
													</table>
												</td>
											</tr>
											
											<tr align="right">
												<td align="right"></td>
											</tr>
											
											<tr>
												<td valign="right"></td>
											</tr>
										</table>
									</td>
	            				</tr>           
	        				</table>
	        				<div style="" id="reply_wrapper"><div id="reply_div">
								<form method="post" action="" id="reply_form"> <input type="hidden" id="reply_referrer" name="referrer" value="inlinenoclick_browse">
								<input type="hidden" name="filepath" id="filepath">
								<input type="hidden" name="origfilename" id="origfilename">
								<input type="hidden" value="http://delhi.quikr.com/ACE-USB-Wire-Data-Cable-Only-On-Rs-99-W0QQAdIdZ104613950" id="reply_aurl"><input type="hidden" value="repin104613950" id="capkey">
								<table width="100%" cellspacing="0" cellpadding="0" border="0" style="margin:0px">
						                 <tbody><tr>
						                   <td><table width="100%" cellspacing="0" cellpadding="0" border="0" style="margin:0px;background-color:#96ca42">
						                     <tbody><tr>
						                       <td width="11%" valign="top" rowspan="2">
						                       
						                       <div style="width:69px; height:31px; background-image:url(http://static.kuikr.com/images/icons_sprite.png); background-position:-318px -72px"></div>
						                       </td>
						                       <td width="67%" height="28">Message:<span style="margin: 0px; vertical-align: middle;">
						                         <input type="text" onblur="if(this.value=='') this.value='Upto 250 Characters';" onfocus="if(this.value=='Upto 250 Characters') this.value='';" value="Upto 250 Characters" id="reply_content" name="reply_content" class="inreply_message">
						                       </span></td>
						                       <td width="5%" align="center"><strong><a class="newclosebtn" onclick="replyClose()" href="javascript:void(0)" style="font-size: 15px;">×</a></strong></td>
						                     </tr>
						                     <tr>
						                       <td valign="top" height="29"><div class="inreply_em" style="float: left;">Email: 
						                           <input type="text" value="" id="reply_email" name="reply_email" style="margin-left: 19px; margin-right: 4px; width: 57%;"></div>
						                       <div class="inreply_mb" style="float: left;">Mobile:
						    			       <input type="text" onblur="if(this.value=='') this.value='Optional';" onfocus="if(this.value=='Optional') this.value='';" value="Optional" id="reply_mobile" name="reply_mobile" style="margin-right: 5px; width: 54%;"></div><div name="divAttachResume" id="divAttachResume" style="display: none;"></div><div id="capt"></div></td>
						                       <td>&nbsp;</td>
						                     </tr><tr>
						                       <td height="28" align="left" style="border-top: solid 1px #a9dd49;padding-top:2px" colspan="3">
						                      
						                       <div id="alert_string" style="float:left;padding-left:8px;width:87%">
								 <input type="hidden" value="delhi" id="cityName" name="cityName">
								 <input type="checkbox" value="1" name="reply_alert" checked="" id="reply_alert">&nbsp;Send me Quikr Email/SMS Alerts for people selling mobile accessories in Delhi.</div><div style="float:right;"><a onclick="replySubmit();" id="reply_link" style="text-decoration:none;" href="javascript:void(0)"><div style="float: right; padding-right: 5px;" class="inline_reply_button_sprite">Submit</div></a></div><div style="display:inline" id="reply_progress"></div><div style="display:inline" id="reply_progress"></div></td>
						                       
						                     </tr>
						                   </tbody></table>
						</td>
						                 </tr>
						               </tbody></table></form><div style="text-align:right;font-size:10px">By clicking Submit, you agree to our <a href="/html/termsandconditions.php" target="_blank" rel="nofollow">Terms of Use</a> &amp; <a href="/html/privacy.php" target="_blank" rel="nofollow">Privacy Policy</a></div></div><div id="reply_error"></div><div style="display:none;" id="reply_success"><table width="100%" cellspacing="0" cellpadding="0" border="0" style="margin:0px; padding:0px; line-height:normal">
							<tbody><tr>
						    <td></td>
						    <td></td>
						    <td height="10" align="right"><a onclick="replyClose();" href="javascript:void(0)"><span height="12" width="12">x</span></a></td>
						  </tr>
						  <tr>
						    <td width="64" bgcolor="#95ca41" align="left">
						  
						    <div style="width: 69px; height: 31px; background-image: url('http://static.kuikr.com/images/icons_sprite.png'); background-position: -318px -72px;"></div>
						    </td>
						    <td bgcolor="#95ca41" style="font-weight:bold;color:#0000" colspan="4">Your reply has been sent to the poster of the Ad.</td>
						  </tr>
						</tbody></table></div>
								<div class="blank5"></div><div style="display:none;color:#000" id="NoClick"></div></div>				
	    				</div>
	    			<?php $i++;}?>
					<div class="paging">
			        	<?php echo $paging;?>			        	
			        </div><!--End.paging-->
						    				
    				
    				
					<table width="100%" border="0" cellspacing="0" cellpadding="0">
						<tr class="tieude">
				            <td colspan="2" style="border-bottom: 1px dotted gray;">Tiêu đề tin</td>
				            <td style="border-bottom: 1px dotted gray; text-align: left;" class="vis">Nơi rao</td>
				            <td style="border-bottom: 1px dotted gray;" class="vis">Lượt xem</td>
				            <td style="border-bottom: 1px dotted gray;" class="date_port">Ngày đăng</td>
			          	</tr>
			          	<?php $i=1; foreach ($listproductcategory as $rowlist){?>
			          	<tr <?php if ($i%2==0){?>class="arrow_1"<?php }?>>
				            <td><img src="<?php echo base_url()?>images/sites/bul_vip.gif" width="9" height="9" /></td>
				            <td><a href="#"><?php echo $rowlist['title']?></a></td>
				            <td class="vis" style="text-align: left; color: #205B81;">
				            	<?php
				            		if (!empty($rowlist['distinct_id']))
				            		{
				            			$row_distinct	= $this->db->get_where('distincts', array('id'=>$rowlist['distinct_id']))->row_array();
				            			echo $row_distinct['name'];
				            		}
				            		else
				            		{
				            			$row_province	= $this->db->get_where('provinces', array('id'=>$rowlist['province_id']))->row_array();
					            		echo $row_province['name'];
				            		}
				            	?>
				            </td>
				            <td class="vis" style="color: #205B81;"><?php echo $rowlist['click']+1?></td>
				            <td class="date_port" style="color: #205B81;"><?php echo date('d-m-Y', $rowlist['updatedate'])?></td>
			          	</tr>
			          	<?php $i++;}?>			          					         
			        </table>
				        
			        <div class="paging">
			        	<?php echo $paging;?>			        	
			        </div><!--End.paging-->				        
				</div>
				<div class="clear"></div>
				<!--End.list_main-->
			</div>
			<!--==================================End.col_720-->

<div class="col_250">

<div class="mod_reg">
    	<div class="login">
        	<a href="#">Đăng ký</a>
        	<a href="#">&nbsp;&nbsp;Đăng nhập</a>
        </div>
        <div class="news_post">
        	<a href="#">Đăng tin miễn phí</a>
        </div>
</div><!--End.mod_reg-->

<div class="mod_adv_contact">
Liên hệ quảng cáo<br />
Mr. Duc<br />
Đt: 0166 33 44 186<br />
Email: tienducdesign@gamil.com<br />
</div>

<div class="adv_3">
<a href="#"><img src="<?php echo base_url()?>images/sites/Adv2.png" width="250" height="90" /></a>
<a href="#"><img src="<?php echo base_url()?>images/sites/Adv3.png" width="250" height="90" /></a>
<a href="#"><img src="<?php echo base_url()?>images/sites/Adv5.png"/></a>
</div>

</div>
<!--==================================End.col_250-->


</div><!--End.middle-->
<div class="clear"></div>









<!--__________________________________________Star.footer-->

<div class="footer">

<div class="col_980">
	<ul class="col_footer">Thông tin chung
    	<li><a href="#">Đôi nét về chúng tôi</a>
    	<li><a href="#">Cơ hội nghề nghiệp</a>
    	<li><a href="#">Giờ vàng online giá sốc</a>
    </ul>
	<ul>Trợ giúp
    	<li><a href="#">Hướng dẫn mua hàng</a>
    	<li><a href="#">Trợ giúp thông tin</a>
    	<li><a href="#">Hình thức thanh tóan</a>
    	<li><a href="#">Hình thức mua hàng</a>
    </ul>
	<ul>Chính sách
    	<li><a href="#">Chính sách vận chuyển</a>
    	<li><a href="#">Chính sách bảo hành</a>
    	<li><a href="#">Chính sách đổi trả hàng</a>
    	<li><a href="#">Báo giá lắp đặt</a>
    	<li><a href="#">Chính sách hỗ trợ</a>
    </ul>
	<ul>Điều khoản
    	<li><a href="#">Hướng dẫn mua hàng</a>
    	<li><a href="#">Trợ giúp thông tin</a>
    	<li><a href="#">Hình thức thanh tóan</a>
    	<li><a href="#">Hình thức mua hàng</a>
    </ul>
	<ul>Hỗ trợ đăng tin
    	<li><a href="#">Chính sách vận chuyển</a>
    	<li><a href="#">Chính sách bảo hành</a>
    	<li><a href="#">Chính sách đổi trả hàng</a>
    	<li><a href="#">Báo giá lắp đặt</a>
    	<li><a href="#">Chính sách hỗ trợ</a>
    </ul>
</div><div class="clear"></div>

<div class="menu_footer">
	<div class="col_980">
    	<img src="Images/Home_icon2.png" width="20" height="16" />
        <a href="#">Trang chủ</a>|
        <a href="#">Việc làm</a>|
        <a href="#">Tuyển sinh - đào tạo</a>|
        <a href="#">Bất động sản</a>|
        <a href="#">Ô tô</a>|
        <a href="#">Xe máy</a>|
        <a href="#">Điện tử - Điện máy</a>|
        <a href="#">Đồ dùng - Mặt hàng khác</a>|
        <a href="#">Tìm đối tác</a>|
        <a href="#">Dịch vụ</a>|
        <a href="#">Cộng đồng</a>
        
        <a class="gotop" href="#gotop">
        	<img src="Images/icon_gotop.png" width="19" height="19" />
        </a>
    </div>
</div><div class="clear"></div>

<div class="cop_footer">
	<div class="col_980">
    	<div class="reg_link">
        <a href="http://dangkywebsite.gov.vn/vn/index.html" target="_blank">
        	<img src="Images/dadangky.png" width="96" height="62" />
        </a>
        </div>
        
        <div class="cop_site">
        	Copyright © 2012 raovatABC.com. All rights reserved.<br />
			Giấy phép hoạt động số: 196/GP-BC do Bộ VHTT cấp 20/10/2012.<br />
			RaovatABC.com có trách nhiệm chuyển tải thông tin. Không chịu bất kỳ trách nhiệm nào từ các tin này. <a href="#">Xem chi tiết</a>
        </div>
        <div class="clear"></div>
        
        <div class="info_site">Design by <a href="ymsgr:sendim?tienduc295">tienducdesign@gmail.com</a> - Developer by <a href="ymsgr:sendim?duitnuce86">duitnuce86</a>.
        </div>
    </div>
</div>

</div><!--End.footer-->

</div><!--End.wraper-->

</body>
</html>